//
//  QuizAnalysisCell.m
//  SubmitVCDemo
//
//  Created by Tianlong on 2018/1/24.
//  Copyright © 2018年 Tianlong. All rights reserved.
//

#import "QuizAnalysisCell.h"
#import "QuizQuestionConfig.h"

@interface QuizAnalysisCell ()
// 标题
@property (weak, nonatomic) IBOutlet UILabel *titleL;
// 题号
@property (weak, nonatomic) IBOutlet UILabel *numberL;


@end

@implementation QuizAnalysisCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setItem:(QuizAnalyListItem *)item{
    _item = item;
    self.titleL.text = item.title;
    self.numberL.text = item.number;
    [self adjustTextFontAndTextColor];
}

#pragma mark - 调整文字属性
- (void)adjustTextFontAndTextColor{
    //1:正确 2:待修改 3:待批改
    UIColor *other = [UIColor colorWithRed:241.0/255 green:50.0/255 blue:50.0/255 alpha:0.05];
    if([self.item.type isEqualToString:@"1"]){
        self.titleL.textColor   = [UIColor colorWithHexValue:0x333333];
        self.numberL.textColor  = [UIColor colorWithHexValue:0x333333];
        self.backgroundColor    = [UIColor colorWithHexValue:0xF9F9F9];
    }else if ([self.item.type isEqualToString:@"2"]){
        self.titleL.textColor   = [UIColor colorWithHexValue:0xF13232];
        self.numberL.textColor  = [UIColor colorWithHexValue:0xF13232];
        self.backgroundColor    = other;;
    }else if ([self.item.type isEqualToString:@"3"]){
        self.titleL.textColor   = [UIColor colorWithHexValue:0xF07737];
        self.numberL.textColor  = [UIColor colorWithHexValue:0xF07737];
        self.backgroundColor    = other;
    }
}



@end
